//showBacklinkForm
$(document).ready(function() {
    $('#showAddBacklinkForm').click(function() {
        $('#addBacklinkForm').fadeIn('slow', function(){

        }, 'json');
    });
});

//hideBacklinkForm
$(document).ready(function() {
    $('#hideAddBacklinkForm').click(function() {
        $('#addBacklinkForm').fadeOut('slow', function(){

        });
    });
});
 
//addBacklinkForm
$(document).ready(function() {
    var base_url = $('#base_url').val();
    $('#addPerson').click(function() {
        $.post(base_url+'index.php/portal', {backlinkPartner: $('#backlinkPartner').val(), backlinkLink: $('#backlinkLink').val(), 
                                              backlinkDesc: $('#backlinkDesc').val()} , function(data) {    
          
           if(data.error) {
                $('.error').html(data.error);
                $('.error').fadeIn();
            }
            else{
                alert(data);
            }
        }, 'json');
    });
    
});
